1. Field of the Invention
The present invention relates to an image processor used in three-dimensional computer graphics such as a workstation, a game machine, etc. and capable of outputting an image signal based on polygonal image information in real time.
2. Description of the Related Art
An image processor synthesizes and outputs various kinds of image signals for a CRT display based on image information supplied from the exterior of the image processor. The image processor can synthesize and output a solid two-dimensional image signal, i.e., a pseudo three-dimensional image signal in addition to a two-dimensional plane image signal. Accordingly, for example, the image processor is widely used in a game machine for a three-dimensional image, computer graphics, etc.
A general image processor of this kind uses the technique of a bit mapping display (graphics display). Therefore, the image processor has a bit mapping memory having memory areas one-to-one corresponding to all pixels on a CRT screen. All pixel information displayed with respect to one picture are written to each of the memory areas of this bit mapping memory. For example, when an arbitrary figure is displayed in the computer graphics, etc., the contour of a polygon is drawn on the screen and the interior of this polygon is filled with a designated color written to the memory. Therefore, when the number of polygons is increased, a memory having a large capacity is required and it is impossible to process image information at the real time.
Japanese Patent Application Laying Open (KOKAI) No. 62-231379 (international patent class G06F 15/62) shows an image synthesizer which can synthesize and output an image signal at the real time on the basis of contour line information of a supplied figure. This image synthesizer has a contour point information memory means for sequentially writing and storing contour point information into a horizontal scanning memory area corresponding to each of horizontal scanning lines together with a priority of the contour point information. The contour point information are constructed by a pair of leftward and rightward contour points provided by making a contour line of the figure for a CRY display crossing each of the horizontal scanning lines. The contour point information are also constructed by accompanying data of this figure. The image synthesizer also has an index memory for reading the accompanying data included in the respective contour information in synchronization with a horizontal scanning signal from the horizontal scanning memory area corresponding to a vertical scanning position of the horizontal scanning signal. The read accompanying data are written and stored to the index memory at each of addresses thereof in accordance with a priority of the accompanying data. The image synthesizer also has a read address generating means for sequentially reading the contour point pair included in the respective contour information in synchronization with the horizontal scanning signal from the horizontal scanning memory area corresponding to the vertical scanning position. When a horizontal scanning operation is performed in a region designated by each of contour point pairs, the read address generating means outputs a read address of the corresponding accompanying data to the index memory in accordance with the priority of the accompanying data. An image signal for a CRT display is synthesized and outputted at the real time on the basis of the contour point information of the supplied figure.
In the above general image synthesizer, a color code for a polygon is provided as the accompanying data to fill the figure with a color. The polygonal interior is filled with a color based on color information of the color code. This color code is used for only a single color so that only a polygon having the single color can be synthesized and outputted. The accompanying data are used as data provided in a lookup table in a coloring operation. Accordingly, no accompanying data can be changed in accordance with a deformation of the polygon. Therefore, no accompanying data can be changed in accordance with the deformation of the polygon in the case of colors except for the single color.
Recently, various kinds of graphics have been required. Therefore, it is necessary to fill the interior of a polygon with colors except for a single color and shadow the polygon. Further, it is necessary to deform and display a basic pattern in accordance with a figure.
In mapping processing of the image processor, it is necessary to read data out of a mapping memory and write these data to a frame memory in accordance with an area for polygons geometrically transformed with respect to the frame memory. Accordingly, the number of processed polygons is small when an image is synthesized by a CRT at the real time as in a game machine. Accordingly, it is substantially impossible to process the image at the real time.
A Z-buffer method is known as a hidden face processing method for overlapping and displaying a plurality of figures. In this Z-buffer method, a numeric value in a Z-axis direction is compared with a numeric value in a buffer memory one-to-one corresponding to the frame memory. Thus, only a polygon having a small numeric value on the Z-axis is written to the frame memory at any time.
Therefore, at the worst time, it is necessary to perform reading and writing operation of the Z-buffer memory, a reading operation of the mapping memory and a writing operation of the frame memory with respect to all polygons to be processed. Each of the frame memory, the mapping memory and the Z-buffer memory has a large memory capacity and is normally constructed by a memory cheaply manufactured such as a dynamic random access memory (DRAM). Therefore, no real time mapping processing can be performed since a memory access time is long and the number of memory accesses is large.
Further, in the image processor, a plurality of polygons are simultaneously displayed in many cases. In particular, when the plurality of polygons are overlapped and displayed, it is important how an overlapping region of the polygons is filled with a color. Therefore, hidden face erasing processing of the polygons is performed by a hidden face erasing processing circuit.
However, in the hidden face erasing processing circuit, an upper limit of the number of polygons for the hidden face erasing processing is determined in advance. The hidden face erasing processing is performed by the upper limit of the number of polygons by transmitting data from the frame memory to the hidden face erasing processing circuit. Therefore, for example, when the number of processing units is limited to 128, undisplayed polygons are really processed so that it is impossible to display polygons to be displayed later.